﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<DHAA.Areas.Administrator.Models.ProductModels>" %>

        <fieldset>
        <legend>Delete this product</legend>
        
     <div class="cleared-top-5"></div>
        <div class="display-label">ProductName</div>
        <div class="display-field"><%= Html.Encode(Model.ProductName) %></div>
        <div class="cleared-top-5"></div>
         <div class="cleared"></div>
        <div class="display-label">CategoryName</div>
        <div class="display-field"><%= Html.Encode(Model.CategoryName) %></div>
        <div class="cleared-top-5"></div>
    </fieldset>
  
<%
    Ajax.BeginForm("Delete", "Product", FormMethod.Post,
                   new AjaxOptions
                       {
                           UpdateTargetId = "fancybox-content",
                           LoadingElementId = "loadingIcon",
                           OnBegin = "MvcFormOnBegin",
                           OnSuccess = "MvcFormOnSuccess",
                           OnComplete = "MvcFormOnComplete",
                           OnFailure = "MvcFormOnFailure"
                       }, new { enctype = "multipart/form-data" });
    {
%>
<%= Html.ValidationSummary(true) %>
            <%= Html.HiddenFor(model=>model.ProductID) %>
		    <input type="submit" value="Delete" /> |
		    <%= Html.ActionLink("Back to List", "Index") %>
   
    <% } %>


